import { AreaType as AreaTypeEnum } from '@/utils/enum.js'

const getDefaultState = () => {
  return {
    areaConfig: {
			areaType: AreaTypeEnum.province, 
			areaDeep: 3, 
			areaCode: 150000, 
			areaName: '内蒙古自治区'
		}, // 地区配置
  }
}

const state = getDefaultState()

const mutations = {
  RESET_STATE: (state) => {
    Object.assign(state, getDefaultState())
  },
  SET_AREA_CONFIG: (state, areaConfig) => {
    state.areaConfig = areaConfig
  },
}

const actions = {}

export default {
  namespaced: true,
  state,
  mutations,
  actions
}

